package com.bw.employee.controller;

import com.bw.employee.service.TbPermissionsService;
import com.bw.result.ResultVo;
import com.bw.vo.IdVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuzhihao
 * @version 1.0
 * @description: TODO
 * @date 2023/11/11 15:03:43
 */
@RestController
@Slf4j
@RequestMapping("/permission")
public class TbPermissionsController {

    @Autowired
    private TbPermissionsService tbPermissionsService;

    /**
     * @description : //TODO 权限信息搜索
     * @param idVo 部门id 查询权限的同时 回显已有权限
     * @return : com.bw.result.ResultVo
     * @author : liuzhihao
     * @date : 2023/11/13 20:03:06
     */
    @PostMapping("/getCascadeInfo")
    public ResultVo getCascadeInfo(@RequestBody IdVo idVo){
        return tbPermissionsService.getCascadeInfo(idVo);
    }

}
